<?php

namespace App\Models\Adv;

use App\Models\BaseModel;

/**
 * 用户模型层
 *
 * Class Role
 * @package App\Models\Adv
 */
class Adv extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    public $table = 'adv';
    public $dates = [];
    /**
     * Indicates if the model should be timestamped.
     * @var bool
     */
    public $timestamps = false;

    public $appends = ['status_text'];
    public $statusText = [-1 => '删除', 0 => '禁用', 1 => '启用'];

    public function getStatusTextAttribute($value)
    {
        return $this->statusText[$this['status']];
    }
}
